<?php

class Minipage_WebController extends Zend_Controller_Action
{

    public function init()
    {

    }
    /**
     * Show homepage
     * 
     * @throws Exception if home path not found
     */
    public function indexAction()
    {
        $path = realpath(APPLICATION_PATH . '/../home/default/minipage');

        if($path === FALSE) {
            throw new Exception('Home path not found!');
        }
        $layout = Zend_Layout::getMvcInstance();
        // Set a layout script path
        $layout->setLayoutPath($path);
        // Set a view script path:
        $this->view->addScriptPath($path);
        // Load header data
        $head = new Zend_Config_Ini($path . '/index.ini', 'head');
        $this->view->headTitle($head->title);

        $meta = array();
        $meta = $head->meta;

        foreach ($meta as $type => $content) {
            $this->view->headMeta()->appendName($type, $content);
        }
        // Rending the view index.phtml
        $this->render('index', null, true);
    }
}